package com.ai.platform.system.web;

import com.ai.platform.core.annotation.AIController;
import com.ai.platform.core.annotation.RestInvokeService;
import com.ai.platform.core.controller.BaseController;
import com.ai.platform.model.dto.Output;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by yeyingsheng on 2018/5/15.
 */
@AIController
public class IndexController extends BaseController{

    /**
     * 首页
     * @return
     */
    @RequestMapping({"/","index"})
    //@RequiresPermissions("index_index")
    public String index(){
        return "index";
    }

    /**
     * 主页视图
     * @return
     */
    @RequestMapping("main")
    //@RequiresPermissions("index_index")
    public String main(){
        return "main";
    }

    /**
     * 菜单加载
     * @return
     */
    @RequestMapping("loadMenu")
    @RestInvokeService(serviceName = "sysMenuServiceImpl",method = "loadMenu")
    public Output loadMenu(){
       return this.getOutput();
    }
}
